package com.cody.service.impl;

import com.cody.dao.PassageDao;
import com.cody.entity.Passage;
import com.cody.service.PassageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Cody
 * @date 2021/4/8 - 15:10
 */
@Service
public class PassageServiceImpl implements PassageService {
    @Autowired
    PassageDao passageDao;
    @Override
    public List<Passage> queryAllPassage() {
        return passageDao.queryAllPassage();
    }

    @Override
    public List<Passage> queryCommentByKeyword(String keyword) {
        return passageDao.queryCommentByKeyword(keyword);
    }

    @Override
    public Passage querySinglePassage(Integer passageId) {
        return passageDao.querySinglePassage(passageId);
    }

    @Override
    public Boolean insertPassage(Passage passage) {
        return passageDao.insertPassage(passage);
    }

    @Override
    public boolean updPassageInfo(Passage passage) {
        return passageDao.updPassageInfo(passage);
    }

    @Override
    public boolean delPassageByPassageId(Integer passageId) {
        return passageDao.delPassageByPassageId(passageId);
    }
}
